<%@page import="Entities.*"%>
<%@page import="Helpers.*"%>
<%@page import="Hibernate.*"%>
<%@page import="java.util.*"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Rollen</title>
    </head>
    <body>
        <%
            String id = request.getParameter("id");
            String naam = request.getParameter("naam");
            boolean actief = Boolean.parseBoolean(request.getParameter("actief"));

            ContentDetailHelper helper = new ContentDetailHelper();
            ContentDetail contentDetail = helper.getContentDetail(Integer.parseInt(id));

            contentDetail.setNaam(naam);
            contentDetail.setActief(actief);

            helper.updateContentDetail(contentDetail);

            response.sendRedirect("showContentDetail.jsp?id="+contentDetail.getId());
       %>


    </body>
</html>
